import Cookies from 'js-cookie'

const TokenKey = 'admin_token'
const UserDataKey = 'admin_userdata'
//token
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

//user_data
export function getUserData() {
  return Cookies.get(UserDataKey)
}

export function setUserData(userdata) {
  return Cookies.set(UserDataKey, userdata)
}

export function removeUserData() {
  return Cookies.remove(UserDataKey)
}
